﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace EggGame
{
    class Program
    {
        static void Main(string[] args)
        {
            var redheadEgg = new RedHeadEgg();

            // 具体的新的行为可以在加载具体蛋仔角色时设置给此蛋仔
            //redheadEgg.SetSoundBehavior(new BabyFestivalSound());
            redheadEgg.SetSoundBehavior(new DigGardenSound());
            redheadEgg.Display();
            redheadEgg.Fly();
            redheadEgg.Swim();
            redheadEgg.Sound();
            redheadEgg.Roll();

            Console.WriteLine();

            var megg = new MachineEgg();
            //megg.SetSoundBehavior(new BabyFestivalSound());
            megg.Display();
            megg.Fly();
            megg.Swim();
            megg.Sound();
            megg.Roll();

            Console.ReadKey();
        }
    }
}
